﻿<?php
$isLogin = false;
define("MODE", "FO");
if ((isset($_SESSION['admin_id'])) && ($_SESSION['admin_id'] != ''))
{
		$isLogin = true;
}

if ($isLogin == false)
{
	$sModule = 'login';
	$sModuleDir = PATH_CONTROL_ADMIN . $sModule. '.php';
	include($sModuleDir);
	die();
}
$DB_CONNECT 	= mysql_connect(DB_HOST, DB_USER, DB_PASS) or die(mysql_error().$DB_HOST);
$DB_SELECT 		= mysql_select_db(DB_NAME, $DB_CONNECT) or die(mysql_error().$DB_HOST);
$sql = "SELECT COUNT(*) FROM ams_product";
$rs = mysql_query($sql);
$row = mysql_fetch_array($rs);
$Items = $row[0];
if(MAX_ITEMS > 0 && MAX_ITEMS <= $Items && $_GET['msg']!=md5("max_item")){
	redir(HOST_ADDR.REMOTE_PATH."?msg=".md5("max_item"));	
}
if($_GET['msg']==md5("max_item")){
	echo "<span style='color:#990000;font-weight:bold;'>商品登録数が３００を超えました。リミット解除をご希望は <a href='mailto:info@oohs.jp'>info@oohs.jp</a> までご連絡下さい。</span>";
}
?>